;;; init-treesitter.el --- Enable Treesitter-based major modes -*- lexical-binding: t -*-
;;; Commentary:
;;; Code:

;; You can download per-architecture pre-compiled release from
;; https://github.com/emacs-tree-sitter/tree-sitter-langs Rename
;; contained grammars to add prefix "libtree-sitter-", place in
;; ~/.emacs.d/tree-sitter.
;;
;; Nix users can pre-install all grammars alongside their Emacs, see
;; https://github.com/nix-community/emacs-overlay/issues/341
;;
;; Note that grammar files from different sources can be differently
;; named and configured, so there could be different results. Some
;; common remappings are included below.


;;; Enable built-in and pre-installed TS modes if the grammars are available

(use-package treesit
  :defer .1
  :config
  ;(setq treesit-font-lock-level 4)
  (setq treesit-language-source-alist
    '((elisp      . ("https://githubfast.com/Wilfred/tree-sitter-elisp"))
      (toml       . ("https://githubfast.com/tree-sitter/tree-sitter-toml"))))
  ;(add-to-list 'major-mode-remap-alist '(python-mode . python-ts-mode))
)


(provide 'init-treesitter)
;;; init-treesitter.el ends here
